<!DOCTYPE html>
<html lang="en">
<head>

<meta header("content-type:text/html;charset=gbk");>

	<title>视频类别列表</title>
</head>
<body>
<?php 
  require_once('inc_admin.php');
   require_once('menu.php');
  connect();
  $sql='select * from videotype';
  $result=fetch_array($sql);
?>
<center><h3>视频类别列表</h3></center>
<table align="center" width="80%" border="1">
<tr>
	<th>编号</th>
	<th>视频类别名称</th>
	<th>操作</th>
</tr>
<?php 
foreach ($result as $row ) {
		 echo '<tr>';
	 echo '<td>'.$row['tid'].'</td>'; 
	 echo '<td>'.$row['typename'].'</td>'; 
	 echo '<td><a href="vtForm.html">添加</a> | <a href="vtEditForm.php?id='.$row['tid'].' ">修改</a> | <a href="vtDelete.php?id='.$row['tid'].'" onClick="return confirm(\'确定要删除吗？\');">删除</a></td>';
	 echo '</tr>';  
  }
  echo '</table>';  
  $totalrows = count($result);
  echo "<table align='center'><tr><td>共有{$totalrows}</td></tr></table>";   
 ?>
</table>
</body>
</html>